<!-- Begin plan/view.tpl -->
<form method="post" action="">
{opentable}
{titlebar title=$title colspan = 3}
<tr>{$perio}</tr>
<tr>{$team}</tr>
<tr>{$msgrp}</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->group}</td>
	<td class="sectiontableentry1" width="80%">
		<select name="gid">
			<option value=""></option>
			{foreach from=$smarty.session.groups item=group}	
				<option {if ($smarty.post.gid == $group)} selected {/if} value="{$group}" >{groupname id=$group}</option >
			{/foreach}
			</select>
	</td>		
</tr>
<tr>
<td class="sectiontableentry1" colspan="2"><input type="submit" name="validate" class="button" align="center" value={$lg->OK}></td>
</tr>
</table>
</form>

{opentable}
	{if is_array($t_month) }
		<tr>
			<td> </td>
		{foreach from=$t_month key=month item=s_month}
			<td class="sectiontableheader" align="center" >{$month}</td>
		{/foreach}
			<td class="sectiontableheader" align="center" >{$lg->total}</td>
		</tr>
		<tr class="sectiontableentry2" >
			<td >{$lg->nbusr}</td>
			{foreach from=$t_users key=month item=s_users}
				<td align="center">{if $s_users.total > 0}{$s_users.total}{else}{$s_users.theor}{/if}</td>
			{/foreach}
		</tr>
		<tr class="sectiontableentry2" >
			<td >{$lg->nbjro}</td>
			{foreach from=$t_nbjro key=month item=value}
				<td align="center">{$value}</td>
			{/foreach}
		</tr>
		<tr class="sectiontableentry2" ></tr>
		{foreach from=$t_groups key=gid item=s_groups}
		<tr class="sectiontableentry2" >
			<td nowrap><a href="file:///C|/Program%20Files/EasyPHP%202.0b1/www/Support/themes/default3/tpl/plan/?module=plan&action=edit&gid=%7B$gid%7D&team=%7B$smarty.post.team%7D&submit=true">{$s_groups.name}</a></td>
			{foreach from=$t_real[$gid] key=month item=s_rlmth}
				<td align="center">{$s_rlmth}</td>
			{/foreach}
			
		</tr>
		{if is_array($t_plgrp[$gid]) }
			<tr class="sectiontableentry1" >
				<td nowrap><i>{$s_groups.name} Planed</i></td>
				{foreach from=$t_plgrp[$gid] key=month item=value}
					<td align="center"><i>{$value}</i></td>
				{/foreach}
			</tr>
		{/if}
		{/foreach}
		<tr class="sectiontableheader" >
			<td nowrap>{$lg->total}</td>
			{foreach from=$t_tot_real key=month item=value}
				<td align="center">{$value}</td>		
			{/foreach}
		</tr>
		<tr class="sectiontableentry2" >
			<td nowrap><i>{$lg->total} {$lg->plan}</i></td>
			{foreach from=$t_tot_plan key=month item=value}
				<td align="center"><i>{$value}</i></td>		
			{/foreach}
		</tr>
	{/if}
</table>